<?php
require_once dirname(__FILE__) . '/../DAO/UserDAO.php';
class UserService {

    public function login($context, $result,$uid, $pass) {
        $user = false;
    	try {
            $userDAO = new UserDAO($context);

            $user = $userDAO -> login($uid, $pass);
            if(empty($user))
            	return false;
        } catch (Exception $e) {
            $result -> setException($e);
            $context -> logException($e);
        }
        return $user;
    }
}
?>